package com.asset.crm.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@SuppressWarnings("serial")
@Entity
@Table(name="view")
public class View implements Serializable{
	
 private Integer id;
 private Employee viewOwner;
 private Boolean visible;
 private String name;
 private String uniqueName;
 private String periodType;
 private String fromDomain;
 
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE ,generator="view_id_seq")
	@SequenceGenerator(name="view_id_seq",sequenceName="view_id_seq",allocationSize=1)
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}	
	
	@ManyToOne
	@JoinColumn(name="owner_id")
	public Employee getViewOwner() {
		return viewOwner;
	}
	public void setViewOwner(Employee viewOwner) {
		this.viewOwner = viewOwner;
	}
	
	@Column(name="visible")
	public Boolean getVisible() {
		return visible;
	}
	public void setVisible(Boolean visible) {
		this.visible = visible;
	}
	
	@Column(name="name")
	public String getName() {
	return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	@Column(name="unique_name")
	public String getUniqueName() {
		return uniqueName;
	}
	public void setUniqueName(String uniqueName) {
		this.uniqueName = uniqueName;
	}
	
	@Column(name="period_type")
	public String getPeriodType() {
		return periodType;
	}
	public void setPeriodType(String periodType) {
		this.periodType = periodType;
	}
	
	@Column(name="from_domain")
	public String getFromDomain() {
		return fromDomain;
	}
	public void setFromDomain(String fromDomain) {
		this.fromDomain = fromDomain;
	}

}
